-
Notifications
You must be signed in to change notification settings - Fork 22
SLLS-345 fall back to window/showMessage for unsupported clients #551
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
SLLS-345 fall back to window/showMessage for unsupported clients #551
Conversation
|
schrieveslaach
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sophio-japharidze-sonarsource, thanks for looking into #548. Please, have a look at my remarks.
| @JsonNotification("doNotShowMissingRequirementsMessageAgain") | ||
| void doNotShowMissingRequirementsMessageAgain(); | ||
|
|
||
| enum MissingRequirementsNotificationDisplayOption { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#548 introduced ShowMissingRequirementsNotificationDeserializer to keep the protocol backward compatible (sonarlint/canShowMissingRequirementsNotification can then return boolean and the enum values).
This could be extremely helpful, because currently, I know that users of sonarlint.nvim are on different versions. For example, people on Mason did not receive a recent update because mason-org/mason-registry#11979 is blocked for some reason.
If you don't want to include the custom deserializer, then I suppose this is another major version bump, isn't it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated the PR with the custom deserialiser. I've added tests for it, and tested manually that it works. Please also double-check on your side.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for taking the time. I wanted to test it locally by building the version on this branch, but the compilation failed because some dependencies are not publicly available:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.163 s
[INFO] Finished at: 2025-11-06T08:23:02+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project sonarlint-language-server: Could not resolve dependencies for project org.sonarsource.sonarlint.ls:sonarlint-language-server:jar:4.5-SNAPSHOT
[ERROR] dependency: org.sonarsource.sonarlint.core:sonarlint-java-client-utils:jar:10.36.0.83608 (compile)
[ERROR] Could not find artifact org.sonarsource.sonarlint.core:sonarlint-java-client-utils:jar:10.36.0.83608 in central (https://repo.maven.apache.org/maven2)
[ERROR] dependency: org.sonarsource.sonarlint.core:sonarlint-rpc-protocol:jar:10.36.0.83608 (compile)
[ERROR] Could not find artifact org.sonarsource.sonarlint.core:sonarlint-rpc-protocol:jar:10.36.0.83608 in central (https://repo.maven.apache.org/maven2)
[ERROR] dependency: org.sonarsource.sonarlint.core:sonarlint-rpc-impl:jar:10.36.0.83608 (compile)
[ERROR] Could not find artifact org.sonarsource.sonarlint.core:sonarlint-rpc-impl:jar:10.36.0.83608 in central (https://repo.maven.apache.org/maven2)
[ERROR] dependency: org.sonarsource.sonarlint.core:sonarlint-rpc-java-client:jar:10.36.0.83608 (compile)
[ERROR] Could not find artifact org.sonarsource.sonarlint.core:sonarlint-rpc-java-client:jar:10.36.0.83608 in central (https://repo.maven.apache.org/maven2)
Is there a public Maven repo that I can add to my Maven settings and that hosts these versions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found a workaround: I cherry-picked your commit onto the tagged release and then I could build it locally. Then, I could see the error in Neovim based, using this MR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! Once my teammate approves the changes, I will merge the PR and close the other one. Thanks for the contribution! 🙇
src/main/java/org/sonarsource/sonarlint/ls/SonarLintExtendedLanguageClient.java
Show resolved
Hide resolved
6ebb716 to
920ef02
Compare
920ef02 to
3e152d4
Compare
|




SLLS-345